package dominio.xml;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

import dominio.beans.Cliente;
import dominioSets.srv.SetListaClientes;

public class ClienteXML {

	static XStream xstream;
	
	static { 
		xstream = new XStream(new DomDriver());
	}
	public void pasaraXml(SetListaClientes clientes)
	{
		xstream.alias("Cliente",Cliente.class);
		
		xstream.toXML(clientes);
	}
	public SetListaClientes obtenerCliente()
	{
		SetListaClientes clientes;
		clientes = (SetListaClientes) xstream.fromXML("Clientes");
		return clientes;
	}
}
